package com.HomeWorkhsp.Chapter08.homework.homework03;

public class Scientist extends Staff{
    private double bonus;
    Scientist(double salary, String name){
        super (salary, name);
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    @Override
    public void printSal(){
        System.out.println(getName() + " 科学家 " + (bonus + getSalMonth() * getSalary()));
    }
}

